import request from '@/utils/request'

// 1. 获取部门列表数据
export const reqGetDepartment = () => {
  return request.get('/company/department')
}

// 2. 获取负责人列表
export const reqGetManagerList = () => {
  return request.get('/sys/user/simple')
}

// 3. 新增部门
export const reqAddDepartment = (data) => {
  return request.post('/company/department', data)
}

// 4. 根据部门id获取部门详情
export const reqGetDeptDetail = (id) => {
  return request.get(`/company/department/${id}`)
}

// 5. 根据部门的id去修改部门
export const reqUpdateDepartment = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}

// 6. 根据部门id去删除部门
export const reqDelDepartment = (id) => {
  return request.delete(`/company/department/${id}`)
}
